package com.person.yan.a02_dagger.module;

import android.content.Context;

import com.person.yan.a02_dagger.bean.PersonBean;
import com.person.yan.a02_dagger.dao.UserDao;

import dagger.Module;
import dagger.Provides;

/**
 * Created by ywy on 2017/9/30.
 */
@Module
public class MainActivityModule {

    private Context context;

    public MainActivityModule(Context context) {
        this.context = context;
    }

    @Provides
    public UserDao providerDao(Context context){
        return new UserDao(context);
    }

//    @Provides
//    public Context providerContext(){
//        return IWMSAPP.context;
//    }

    @Provides
    public Context provideContext(){
        return context;
    }

    @Provides
    public PersonBean providerPerson(){
        return new PersonBean();
    }
}
